#pragma once
#include "WeaponManager.hpp"
#include "UnitFwd.hpp"

namespace he
{
	//! Unit manager.
	class UnitManager : boost::noncopyable
	{
		// Typedefs
	private:
		//! Unit tuple (files size, last modification date, Unit ptr).
		typedef boost::tuple<unsigned int, std::time_t, UnitPtr_t> UnitTuple_t;
		//! Map of units.
		typedef std::map<std::string, UnitTuple_t> UnitMap_t;

		// Attributes
	private:
		//! Working path.
		boost::filesystem::path const &m_WrkPath;
		//! Weapon manager.
		WeaponManager m_WeaponManager;
		//! Map of all units.
		UnitMap_t m_UnitMap;

		// Operations
	public:
		//! Load afv unit.
		UnitPtr_t load_afv_unit(std::string const &Side, std::string const &UnitName);

		// Construction/Destruction
	public:
		UnitManager(boost::filesystem::path const &WrkPath);
	};
} /*he*/
